When loadseg changed the jump table entries from unloaded style to loaded style, it replaced the Loadseg instruction in the last six bytes with a direct, absolute address jump to the routine. An absolute jump works, because once the segment is loaded, it's locked. LoadSeg computes this address dynamically at the time it modifies the jump table entry by getting the newly loaded segment's handle, double de-referencing it, and adding it the offset to the desired routine, which it gets from the other 2 bytes in the jump table entry. Figure 6-11 shows how this process works.
Note that when the jump table is in the loaded state the first two bytes are used to keep the segment number. This is done so that later, when the segment is unloaded, the entry can be restored to its unloaded state (MOVE.W segnum, -(A7); LoadSeg).
A segment gets unloaded when the application calls UnloadSeg. When you call UnloadSeg, the process of loading the segment us reversed. First, UnloadSeg unlocks the segment. Then it looks through the jump table for all entries for routines in this segment and changes each one to the unloaded state. It does not change the purgeable status of the segment; since most segments are normally marked purgeable when they're created by the development system, unloaded segments may be purged.
-- part contents for card part 10
----- text -----
The "Speedy In-Box" will display messages that are being sent to you in response to requests that you issued via the "Speedy Memo" card. To clear out your in box, click on the "Erase Messages" icon.
Note that responses are limited to 4624 characters. This is a fundamental limitation of the AppleTalk Transaction Protocol.